home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / helicopter.swf / scripts / frame_5 / PlaceObject2_54_43 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  749 b   |  22 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.helicopter.scrollStart == true)
  3.    {
  4.       if(flag == false)
  5.       {
  6.          flag = true;
  7.          _root.obstacle.duplicateMovieClip("obstacle" + depthCounter,depthCounter);
  8.          _root["obstacle" + depthCounter]._y = random(100) + 100;
  9.       }
  10.       if(_root.movieWidth / 2 >= _root["obstacle" + depthCounter]._x && _root.movieWidth / 2 - _root.obstacle._width >= _root["obstacle" + depthCounter]._x)
  11.       {
  12.          depthCounter++;
  13.          if(depthCounter >= 420)
  14.          {
  15.             depthCounter = 400;
  16.          }
  17.          _root.obstacle.duplicateMovieClip("obstacle" + depthCounter,depthCounter);
  18.          _root["obstacle" + depthCounter]._y = random(100) + 100;
  19.       }
  20.    }
  21. }
  22.